Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.15.z] Do not store uv cache, uv to use venv interpreter #16407

Merged

Conversation

Satellite-QE
Copy link
Collaborator

Cherrypick of PR: #16396

Problem Statement

  1. uv cache bloats the image and also causes issues in the downstream image build
  2. during the image build, in the RUN step, the shell environment is not sourced, the python environment in $APP_ROOT is not activated and therefore VIRTUAL_ENV env variable is not defined. That causes uv not to discover the venv interpreter and it creates its env in .venv and installs robottelo in it.

Solution

  1. as the upstream fedora/python-312 image forces pip to not create the cache, we should mimic it for uv too
    • set UV_NO_CACHE=1
  2. Tell uv to use Python from the existing virtual env
    • set UV_PYTHON="${APP_ROOT}/bin/python3"

Do not store uv cache in the container image

(cherry picked from commit f0f4616)
@Satellite-QE Satellite-QE requested a review from a team as a code owner September 18, 2024 13:31
@Satellite-QE Satellite-QE added 6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches labels Sep 18, 2024
@ogajduse ogajduse merged commit 19fdde7 into 6.15.z Sep 19, 2024
13 checks passed
@ogajduse ogajduse deleted the cherry-pick-6.15.z-f0f4616bbc60789bdf98c097e8149d86b38de414 branch September 19, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 Auto_Cherry_Picked Automatically cherrypicked PR using GHA No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants